package com.esri.core.geometry;

/* loaded from: classes.dex */
class SimpleMapGeometryCursor extends MapGeometryCursor {
    MapGeometry a;
    MapGeometry[] b;
    int c;
    int d;

    public SimpleMapGeometryCursor(MapGeometry mapGeometry) {
        this.a = mapGeometry;
        this.c = -1;
        this.d = 1;
    }

    public SimpleMapGeometryCursor(MapGeometry[] mapGeometryArr) {
        this.b = mapGeometryArr;
        this.c = -1;
        this.d = mapGeometryArr.length;
    }

    @Override // com.esri.core.geometry.MapGeometryCursor
    public int getGeometryID() {
        return this.c;
    }

    @Override // com.esri.core.geometry.MapGeometryCursor
    public MapGeometry next() {
        int i = this.c;
        if (i < this.d - 1) {
            int i2 = i + 1;
            this.c = i2;
            MapGeometry mapGeometry = this.a;
            return mapGeometry != null ? mapGeometry : this.b[i2];
        }
        return null;
    }
}
